<form action="shop_pay.manage.php" id="form_update" name="form_update" method="post">
<input type="hidden" name="action" value="detail_update" />
<input type="hidden" name="id" id="id" value="<tpl> $detail_array.pay_detail_id </tpl>" />
<table class="from_table">
	<tr>
	  <th colspan="6" align="left" style="text-align:left; padding-left:10px"><tpl> $langSysShopPayDetailMemberInfo </tpl></th>
	</tr>
	<tr>
	    <th width="150"><tpl> $langSysShopPayMemberName </tpl>：</th>
		<td width="100" class="td1"><tpl> $detail_array.login_name </tpl></td>
		<th></th>
	    <td width="100" class="td1"></td>
		<th></th>
	    <td width="100" class="td1"></td>
	</tr>
	<tr>
	    <th width="150" ><tpl> $langSysShopPayDetailShopUsedTime </tpl>：</th>
		<td width="100" class="td1" colspan="3"><tpl> $detail_array.shop_availability_time|default:$langSysShopPayDetailNothing </tpl></td>
		<th><tpl> $langSysShopPayDetailProductNumber </tpl>：</th>
	    <td width="100" class="td1"><tpl> $detail_array.product_number|default:'0' </tpl><tpl> $langSysShopPayDetailProductNumberUnit </tpl></td>
	</tr>
</table>
<table class="from_table">
	<tr>
	  <th colspan="6" align="left" style="text-align:left; padding-left:10px"><tpl> $langSysShopPayInfo </tpl></th>
	</tr>
	<tr>
	    <th width="150"><tpl> $langSysShopPayType </tpl>：</th>
		<td width="100" class="td1">
			<tpl> if $detail_array.pay_type eq '1' </tpl>
				<tpl> $langSysShopPayOnline </tpl>
			<tpl> /if </tpl>
			<tpl> if $detail_array.pay_type eq '2' </tpl>
				<tpl> $langSysShopPayOffline </tpl>
			<tpl> /if </tpl>
		</td>
		<th><tpl> $langSysShopPayName </tpl>：</th>
	    <td width="100" class="td1">
			<tpl> if $detail_array.pay_type eq '1' </tpl>
				<tpl> if $detail_array.pay_name eq 'alipay' </tpl>
					<tpl> $langSysShopPayAlipay </tpl>
				<tpl> /if </tpl>
				<tpl> if $detail_array.pay_name eq 'tenpay' </tpl>
					<tpl> $langSysShopPayTenpay </tpl>
				<tpl> /if </tpl>
			  <tpl> /if </tpl>
			  <tpl> if $detail_array.pay_type eq '2' </tpl>
				<tpl> $detail_array.pay_name </tpl>
			  <tpl> /if </tpl>
		</td>
		<th><tpl> $langSysShopPayState </tpl>：</th>
	    <td width="100" class="td1">
			<tpl> if $detail_array.pay_sign eq '0' </tpl>
				<tpl> $langSysShopPayDetailPayStateZero </tpl>
			<tpl> /if </tpl>
			<tpl> if $detail_array.pay_sign eq '1' </tpl>
				<tpl> $langSysShopPayDetailPayStateOne </tpl>
			<tpl> /if </tpl>
			<tpl> if $detail_array.pay_sign eq '2' </tpl>
				<tpl> $langSysShopPayDetailPayStateTwo </tpl>
			<tpl> /if </tpl>
			<tpl> if $detail_array.pay_sign eq '3' </tpl>
				<tpl> $langSysShopPayDetailPayStateThree </tpl>
			<tpl> /if </tpl>
		</td>
	</tr>
	<tr>
	    <th width="150"><tpl> $langSysShopPayDate </tpl>：</th>
		<td width="100" class="td1" colspan="3"><tpl> $detail_array.date_line </tpl></td>
		<tpl> if $detail_array.pay_type eq '2' </tpl>
		<th><tpl> $langSysShopPaySenderNumber </tpl>：</th>
	    <td width="100" class="td1"><tpl> $detail_array.sender_number </tpl></td>
		<tpl> /if </tpl>
	</tr>
	<tpl> if $detail_array.pay_type eq '2' </tpl>
	<!-- 线下 -->
	<tr>
	    <th width="150"><tpl> $langSysShopPayDetailPayAccount </tpl>：</th>
		<td width="100" class="td1"><tpl> $detail_array.pay_account </tpl></td>
		<th><tpl> $langSysShopPayDetailPayConsignee </tpl>：</th>
	    <td width="100" class="td1"><tpl> $detail_array.pay_consignee </tpl></td>
		<th></th>
	    <td width="100" class="td1"></td>
	</tr>
	<tpl> /if </tpl>
</table>
<table class="from_table">
	<tr>
	  <th colspan="6" align="left" style="text-align:left; padding-left:10px"><tpl> $langSysShopPayDetailInfo </tpl></th>
	</tr>
	<tr>
	    <th width="100"><tpl> $langSysShopPayModeName </tpl>：</th>
		<td width="120" class="td1"><tpl> $detail_array.pay_mode_name </tpl></td>
		<th><tpl> $langSysShopPayDetailType </tpl>：</th>
	    <td width="100" class="td1">
			<tpl> if $detail_array.pay_mode_type eq '0' </tpl>
				<tpl> $langSysShopPayModeTypeTime </tpl>
			<tpl> /if </tpl>
			<tpl> if $detail_array.pay_mode_type eq '1' </tpl>
				<tpl> $langSysShopPayModeTypeNumber </tpl>
			<tpl> /if </tpl>
			<tpl> if $detail_array.pay_mode_type eq '2' </tpl>
				<tpl> $langSysShopPayModeTypeAll </tpl>
			<tpl> /if </tpl>
		</td>
		<th><tpl> $langSysShopPayModeMoney </tpl>：</th>
	    <td width="100" class="td1"><tpl> $detail_array.pay_mode_money </tpl></td>
	</tr>
	<tr>
	    <th width="150"><tpl> $langSysShopPayModeShopTime </tpl><tpl> $langSysShopPayAdd </tpl>：</th>
		<td width="100" class="td1"><tpl> $detail_array.pay_mode_shop_show_time|default:'0' </tpl>(<tpl> $langSysShopPayModeUnitDay </tpl>)</td>
		<th><tpl> $langSysShopPayModeProductNumber </tpl><tpl> $langSysShopPayAdd </tpl>：</th>
	    <td width="100" class="td1"><tpl> $detail_array.pay_mode_product_number|default:'0' </tpl>(<tpl> $langSysShopPayModeUnitGe </tpl>)</td>
		<th></th>
	    <td width="100" class="td1"></td>
	</tr>
	<tr>
	    <th width="150"><tpl> $langSysShopPayModeRemark </tpl>：</th>
		<td class="td1" colspan="5"><tpl> $detail_array.pay_mode_remark|default:$langSysShopPayDetailNothing </tpl></td>
	</tr>
	<tr>
	    <th width="150"><tpl> $langSysShopPayModeSystemRemark </tpl>：</th>
		<td class="td1" colspan="5"><tpl> $detail_array.system_remark|default:$langSysShopPayDetailNothing </tpl></td>
	</tr>
</table>
<table class="from_table">
	<tr>
	  <td style="width:150px" align="right">
	  	<tpl> if $detail_array.pay_sign eq '1' </tpl>
	  	<select name="state" id="state" onchange="change();">
			<option value="0"><tpl> $langSysShopPayDetailAllow </tpl></option>
			<option value="1"><tpl> $langSysShopPayDetailDeny </tpl></option>
		</select>
		<tpl> /if </tpl>
	  </td>
	  <td width="530" align="left" style="text-align:left"><div class="btn_marginleft">
	  <tpl> if $detail_array.pay_sign eq '1' </tpl>
	  <span class="btn_left"><input type="submit" value="<tpl> $langSysShopPayDetailSubmit </tpl>" class="btn_submit" /></span>
	  <tpl> /if </tpl>
	  <span class="btn_left"><input type="button" value="<tpl> $langSysShopPayModeReturn </tpl>" class="btn_submit" onclick="ShowDiv='result_content';getPageContent('shop_pay.manage.php?action=detail_list&curpage=<tpl> $condition.curpage </tpl>&search_member_name=<tpl> $condition.search_member_name </tpl>&search_pay=<tpl> $condition.search_pay </tpl>&search_mode_id=<tpl> $condition.search_mode_id </tpl>&search_start_date=<tpl> $condition.search_start_date </tpl>&search_end_date=<tpl> $condition.search_end_date </tpl>');" /></span></div></td>
	</tr>
	<tr id="tr_deny" style="display:none">
	  <td style="width:150px" align="right">
	  	<tpl> $langSysShopPayDetailDenyReason </tpl>：
	  </td>
	  <td width="530" align="left" style="text-align:left">
	  	<textarea name="txt_system_remark" cols="50" rows="6" class="tarea" id="txt_system_remark"></textarea>
		<label style="display:none" for="txt_system_remark" class="wrong" metaDone="true" generated="true"></label>
	  </td>
	</tr>
</table>
</form>
<script>
$(document).ready(function() {
	var options = {
		beforeSubmit:  function(){showLoading(showSaveText);},
		success:       function(msg){
							hideLoading();
							showMessage(msg.message,msg.type);
							if(msg.type == '1'){
								ShowDiv = "result_content";
								getPageContent("shop_pay.manage.php?action=detail_list&curpage=<tpl> $condition.curpage </tpl>&search_member_name=<tpl> $condition.search_member_name </tpl>&search_pay=<tpl> $condition.search_pay </tpl>&search_mode_id=<tpl> $condition.search_mode_id </tpl>&search_start_date=<tpl> $condition.search_start_date </tpl>&search_end_date=<tpl> $condition.search_end_date </tpl>");
							}
						},
		type:      'post',
		dataType:  'json'
	};
	//对表单做的验证定义
	$("#form_update").validate({
		errorClass: "wrong",
		rules: {
			txt_system_remark: {
				required:function(){
					if($('#state').val() == '1'){
						return true
					}else{
						return false;
					}
				}
			}
		},
		messages: {
			txt_system_remark: {required:"<tpl> $errSysShopPayDetailDenyReasonIsEmpty </tpl>"}
		},
		submitHandler: function() {
			$('#form_update').ajaxSubmit(options);
		}
	});
});
//改变审核状态，拒绝状态显示文本域
function change(){
	if($('#state').val() == '0'){//批准
		$('#tr_deny').css('display','none');
	}
	if($('#state').val() == '1'){//拒绝
		$('#tr_deny').css('display','');
	}
}
</script>